package com.woniuxy.entity;

import javax.validation.Valid;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * @Author: 马宇航
 * @Todo: DTO：data transport object 数据传输对象
 * @DateTime: 22/03/31/0031 上午 11:02
 * @Component: 成都蜗牛学苑
 **/
public class RbacManagerDTO extends RbacManager{
    @Email(message = "email error！")
    String email;
    @NotEmpty(message = "username not null")
    String username;
    List<GirlFriend> girlFriends;
// 这里加了这个注解，就支持嵌套校验
    @Valid
    Clazz clazz;

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Clazz getClazz() {
        return clazz;
    }

    public void setClazz(Clazz clazz) {
        this.clazz = clazz;
    }

    @Override
    public String toString() {
        return "RbacManagerDTO{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex=" + sex +
                ", status=" + status +
                ", date=" + date +
                ", girlFriends=" + girlFriends +
                ", clazz=" + clazz +
                '}';
    }

    public List<GirlFriend> getGirlFriends() {
        return girlFriends;
    }

    public void setGirlFriends(List<GirlFriend> girlFriends) {
        this.girlFriends = girlFriends;
    }
}
